<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body> 
</body>
<script>
    let i =0,total=0,
    function fn(){
        if(i==100){
            return
        }
        i++;
        total+=i
        console.log(total);
        fn()
    }
    fn()

</script>
</html>